package com.abby.time;

/**
 * the enum class of date
 */
public enum TimeFormat {
    YEAR("yyyy",0),
    MONTH("MM",1),
    DATE("dd",2),
    HOUR("HH",3),
    MINUTE("mm",4),
    SECOND("ss",5),
    WEEK("EEEE",6);

    private String format;
    private int index;

    TimeFormat(String format,int index){
        this.format=format;
        this.index= index;
    }

    public String getFormat(){
        return format;
    }

    public int getIndex(){
        return index;
    }
}
